import { LOCALE_ID, NgModule } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { HttpClientModule } from '@angular/common/http';
import { registerLocaleData } from '@angular/common';
import zh from '@angular/common/locales/zh';

import { NgZorroAntdModule, NZ_I18N, zh_CN } from 'ng-zorro-antd';

import { AppRoutingModule } from './app-routing.module';
import { httpInterceptorProviders } from './utils/http-interceptors';
import { AppComponent } from './app.component';
import { LoginComponent } from './component/login/login.component';
import { ForbiddenComponent } from './component/forbidden/forbidden.component';
import { PageNotFoundComponent } from './component/page-not-found/page-not-found.component';
import { LayoutComponent } from './component/layout/layout.component';
import { DashboardComponent } from './component/dashboard/dashboard.component';
import { SystemConfigComponent } from './component/system/system-config/system-config.component';
import { PaymentPluginComponent } from './component/system/payment-plugin/payment-plugin.component';
import { WechatBotComponent } from './component/system/wechat-bot/wechat-bot.component';

registerLocaleData(zh);

@NgModule({
  imports: [
    BrowserModule,
    BrowserAnimationsModule,
    FormsModule,
    ReactiveFormsModule,
    HttpClientModule,
    NgZorroAntdModule,
    AppRoutingModule
  ],
  declarations: [
    AppComponent,
    LoginComponent,
    ForbiddenComponent,
    PageNotFoundComponent,
    LayoutComponent,
    DashboardComponent,
    SystemConfigComponent,
    PaymentPluginComponent,
    WechatBotComponent,
  ],
  providers: [
    { provide: LOCALE_ID, useValue: 'zh-Hans' },
    { provide: NZ_I18N, useValue: zh_CN },
    httpInterceptorProviders
  ],
  bootstrap: [AppComponent]
})
export class AppModule { }
